package com.gxa.goods;

import com.gxa.goods.utils.IdWorker;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import springfox.documentation.oas.annotations.EnableOpenApi;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * @author: XHZ
 * @date: 10:05 2021/7/22
 */
@SpringBootApplication
@EnableOpenApi
@MapperScan(basePackages = "com.gxa.goods.mapper")
public class GoodsMainApp {
    public static void main(String[] args) {
        SpringApplication.run(GoodsMainApp.class);
    }

    @Bean//作用全局
    public IdWorker idWorker() {
        return new IdWorker(1, 1);
    }
}
